<template>
  <div>
    <h2>放个歌呗</h2>
    <div id="aplayer"></div>
  </div>
</template>

<script lang>
import APlayer from "aplayer";
import "aplayer/dist/APlayer.min.css";

// https://aplayer.js.org/

export default {
  name: "Music",
  mounted() {
    new APlayer({
      container: document.getElementById("aplayer"),
      theme: "#FADFA3",
      fixed: false,
      lrcType: 3,
      audio: [
        {
          // 名称
          name: "G.E.M 邓紫棋 - 心之焰",
          // 艺术家
          artist: "邓紫棋",
          // 链接
          url: "/music/DZQ-XZY.mp3",
          // 封面
          cover: "/music/DZQ-XZY.JPG",
          lrc: "/music/DZQ-XZY.lrc",
        },
        {
          // 名称
          name: "黄霄雲 - 星辰大海",
          // 艺术家
          artist: "黄霄雲",
          // 链接
          url: "/music/HXY-XCDH.mp3",
          // 封面
          cover: "/music/HXY-XCDH.jpg",
          lrc: "/music/HXY-XCDH.lrc",
        },
      ],
    });
  },
};
</script>